package com.web.exiaodao.business.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;
import com.web.webstart.base.entity.BaseEntity;

/**
 * 
* @ClassName: AutherWorksTable 
* @Description: 玩/艺术/学乐/达人-作品表定义表
* @author eason
* @date 2016-11-03 12:03:34
*
 */
@Entity
@Table(name = "tb_xa_autherworkstable")
@ApiModel(value="玩/艺术/学乐/达人-作品表定义表")
public class AutherWorksTable extends BaseEntity{

	private static final long serialVersionUID = 1L;
	
	@ApiModelProperty(value="作品名称,作品名称")
	private String worksName;
	@ApiModelProperty(value="作者,作者")
	private Long autherID;
	@ApiModelProperty(value="作品价格,作品价格")
	private Double worksPrice;
	@ApiModelProperty(value="作品简介（富文本）,作品简介")
	private String worksIntroduce;
	@ApiModelProperty(value="作品的图片，多张用逗号隔开,作品的图片")
	private String worksImgs;
	@ApiModelProperty(value="作品库存,作品库存")
	private Long worksInventory;
	@ApiModelProperty(value="作品定金,作品定金")
	private Double worksDeposit;
    @ApiModelProperty(value = "点击量,点击量")
    private Long clickCont;
    @ApiModelProperty(value="排序值,排序值")
    private Long sort;

    public static final long SORT_DEFAULT = 9999999L;

    public AutherWorksTable() {
	}
	
	public void setWorksName(String worksName){
		this.worksName=worksName;
	}
	
	@Column(nullable=true,length=50)
	public String getWorksName(){
		return worksName;
	}
	public void setAutherID(Long autherID){
		this.autherID=autherID;
	}
	
	@Column(nullable=true,length=50)
	public Long getAutherID(){
		return autherID;
	}
	public void setWorksPrice(Double worksPrice){
		this.worksPrice=worksPrice;
	}
	
	@Column(nullable=true,length=50)
	public Double getWorksPrice(){
		return worksPrice;
	}
	public void setWorksIntroduce(String worksIntroduce){
		this.worksIntroduce=worksIntroduce;
	}
	
	@Column(nullable=true,length=10000,columnDefinition="MEDIUMTEXT")
	public String getWorksIntroduce(){
		return worksIntroduce;
	}
	public void setWorksImgs(String worksImgs){
		this.worksImgs=worksImgs;
	}
	
	@Column(nullable=true,length=10000)
	public String getWorksImgs(){
		return worksImgs;
	}
	public void setWorksInventory(Long worksInventory){
		this.worksInventory=worksInventory;
	}
	
	@Column(nullable=true,length=50)
	public Long getWorksInventory(){
		return worksInventory;
	}
	public void setWorksDeposit(Double worksDeposit){
		this.worksDeposit=worksDeposit;
	}
	
	@Column(nullable=true,length=50)
	public Double getWorksDeposit(){
		return worksDeposit;
	}
	
    @Column(nullable = true, length = 50)
    public Long getClickCont() {
        return clickCont;
    }

    public void setClickCont(Long clickCont) {
        this.clickCont = clickCont;
    }

    @Column(nullable = true, length = 50)
    public Long getSort() {
        return sort;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    @Override
    public void setInsertBefore() {
        super.setInsertBefore();
        if (sort == null) {
            sort = SORT_DEFAULT;//排序默认值
        }
    }

}
